 /*
 * oled.h
 *
 *  Created on: Nov 17, 2024
 *      Author: 阿妈粽
 */

#ifndef INC_OLED_H_
#define INC_OLED_H_

#include "main.h"
#include "oled_font.h"
#include "stdarg.h"
#include "JY62.h"
#include "stdio.h"
#include "motor.h"
#include "EEPROM.h"
#include "Bluetooth.h"
#include "gw_grayscale_sensor.h"
#include "cam.h"
#include "mission.h"
#include "Stepper_Motor.h"

extern I2C_HandleTypeDef  hi2c1;
extern uint8_t menu_mode; // 菜单模式
extern uint8_t cursor_0; // page0的光标位置
extern uint8_t cursor_1; // page1的光标位置
extern uint8_t cursor_2; // page2的光标位置
extern uint8_t cursor_3; // page3的光标位置
extern uint8_t cursor_4; // page4的光标位置
void OLED_WR_CMD(uint8_t cmd);
void OLED_WR_DATA(uint8_t data);
void OLED_Init(void);
void OLED_Clear(void);
void OLED_Display_On(void);
void OLED_Display_Off(void);
void OLED_Set_Pos(uint8_t x, uint8_t y);
void OLED_On(void);
void OLED_ShowNum(uint8_t x,uint8_t y,unsigned int num,uint8_t len,uint8_t size2,uint8_t Color_Turn);
void OLED_Showdecimal(uint8_t x,uint8_t y,float num,uint8_t z_len,uint8_t f_len,uint8_t size2, uint8_t Color_Turn);
void OLED_ShowChar(uint8_t x,uint8_t y,uint8_t chr,uint8_t Char_Size,uint8_t Color_Turn);
void OLED_ShowString(uint8_t x,uint8_t y,char*chr,uint8_t Char_Size,uint8_t Color_Turn);
void OLED_ShowCHinese(uint8_t x,uint8_t y,uint8_t no,uint8_t Color_Turn);
void OLED_DrawBMP(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t *  BMP,uint8_t Color_Turn);
void OLED_HorizontalShift(uint8_t direction);
void OLED_Some_HorizontalShift(uint8_t direction,uint8_t start,uint8_t end);
void OLED_VerticalAndHorizontalShift(uint8_t direction);
void OLED_DisplayMode(uint8_t mode);
void OLED_IntensityControl(uint8_t intensity);
void OLED_sprintf(uint8_t Line, uint8_t Column, const char *format, ...);
void OLED_proc(void);

#define MENU_PAGE 4
#define CURSOR_COL 110
#endif /* INC_OLED_H_ */
